Semaphore.TrySignal Method

Returns a Boolean. This is a more friendly version of the Signal method that gives you a sneak-peek to determine whether there is a lock available.

Syntax

If there is a lock available, you are granted the lock and TrySignal returns True. When you are finished with the resource, call Release to give it back to the Semaphore. If the lock is not available, you do not wait for it. Instead, TrySignal returns False to let you know. Do not attempt to use the resource after it returns False because you are likely to collide with another thread. If you